;;;QQ:67762207
[@HelperTodayQuest]
{
#IF
Check [209] 0
#SAY
δɳѵҲܽÿ\\
< /@exit>
#ACT
break

#IF
Check [209] 1
StartDailyQuest
#SAY
<ÿ/@ReceiveTodayQuest> \\
#ACT
break

#IF
Check [209] 1
Check [409] 0
!StartDailyQuest
#SAY
<ȷÿ/@ConfirmTodayQuest> \\
#ACT
break

#IF
Check [209] 1
Check [409] 1
!StartDailyQuest
#SAY
ÿɡ\\
< /@exit>
#ACT
break

[@ReceiveTodayQuest]
#SAY
Ժ \\

#IF
Checklevel 11
#ACT
goto @ReceiveTodayQuest_Setting
break
#ELSESAY
ȼ10Ҳܽÿ \\
< /@exit>

[@ReceiveTodayQuest_Setting]
#ACT
goto @SetDairyQuest


[@SetDairyQuest]
#IF
!StartDailyQuest
#SAY
вˡ\\
<ر/@exit>
#ACT
break

#IF
#ACT
set [060] 0
set [061] 0

#IF
Checklevel 71
#ACT
mov D1 10
mov D2 25
mov D3 50
mov D4 90
goto @SetDairyQuest_Setting
break

#IF
Checklevel 61
#ACT
mov D1 8		;;101-201
mov D2 20		;;201-301
mov D3 40		;;301-401
mov D4 72		;;401-501
goto @SetDairyQuest_Setting
break

#IF
Checklevel 41
#ACT
mov D1 6
mov D2 15
mov D3 30
mov D4 54
goto @SetDairyQuest_Setting
break

#IF
Checklevel 31
#ACT
mov D1 4
mov D2 10
mov D3 20
mov D4 36
goto @SetDairyQuest_Setting
break

#IF
Checklevel 11
#ACT
mov D1 2
mov D2 5
mov D3 10
mov D4 18
goto @SetDairyQuest_Setting
break

[@SetDairyQuest_Setting]
#IF
#ACT
movr P0 100

#IF
Large D4 100
#SAY
û¿ˣ\\
<ر/@exit>
#ACT
break

#IF
Small P0 %D1
#ACT
goto @SetDairyQuest_Setting_Grade1
break

#IF
Small P0 %D2
#ACT
goto @SetDairyQuest_Setting_Grade2
break

#IF
Small P0 %D3
#ACT
goto @SetDairyQuest_Setting_Grade3
break

#IF
Small P0 %D4
#ACT
goto @SetDairyQuest_Setting_Grade4
break

#IF
#ACT
goto @SetDairyQuest_Setting_Grade5
break

[@SetDairyQuest_Setting_Grade1]
begin
#IF
#ACT
movr P0 20

#IF
small P0 100
#ACT
inc P0 101
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break
end

[@SetDairyQuest_Setting_Grade2]
begin
#IF
#ACT
movr P0 40

#IF
small P0 100
#ACT
inc P0 201
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break
end

[@SetDairyQuest_Setting_Grade3]
begin
#IF
#ACT
movr P0 40

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break
end

[@SetDairyQuest_Setting_Grade4]
begin
#IF
#ACT
movr P0 99

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break
end

[@SetDairyQuest_Setting_Grade5]
begin
#IF
#ACT
movr P0 100

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break

#IF
small P0 200
#ACT
inc P0 900
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet
break
end

[@SetDairyQuest_Setting_PreSet]
#IF
ELARGE D8 136
ESMALL D8 200 
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "End"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 266
ESMALL D8 300 
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "End"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 600
ESMALL D8 699
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "End"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 703
ESMALL D8 899 
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "End"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
EQUAL D8 400
or EQUAL D8 500
or LARGE D8 900
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "End"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
#ACT
Set [209] 1	;;жǷ˳
Set [210] 0
Set [409] 0	;;жÿǷ
Formatstr "FLD_TQIDX=%s" %D8
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCASE,FLD_TQCondition1,FLD_TQCondition1Amount,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3" [@SetDairyQuest_Setting_ReadSet]
#SAY
Ժ\\

[@SetDairyQuest_Setting_ReadSet()]
#ACT
Mov D1 %ARG(1)
Mov A2 %ARG(2)
Mov D2 %ARG(3)
Mov A3 %ARG(4)
Mov D3 %ARG(5)
Mov A4 %ARG(6)
Formatstr "FLD_TQIDX=%s" %D8
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCondition3Amount,FLD_TQFame,FLD_TQNPC,FLD_TQPosition" [@SetDairyQuest_Setting_ReadSet_Addon]

[@SetDairyQuest_Setting_ReadSet_Addon()]
#ACT
Mov D4 %ARG(1)
Mov D5 %ARG(2)
Mov A5 %ARG(3)
Mov A6 %ARG(4)
Set [409] 0
#IF
EQUAL D1 1
or EQUAL D1 2
or EQUAL D1 9    ;ɱ¡
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "Ready"

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
FormatStr "FLD_Step='%s',FLD_TQCASE=%s,FLD_Condition1='%s'" "NULL" %D1 %A2

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_Condition1Amount=%s,FLD_Condition2='%s',FLD_Condition2Amount=%s" 0 %A3 0

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_Condition3='%s',FLD_Condition3Amount=%s,FLD_TQFame=%s" %A4 0 %D5

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_TQNPC='%s',FLD_TQPosition='%s'" %A5 %A6

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
goto @Ready_QuestDairyToday

#ELSEACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "Ready"

Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
WriteValueSql "TBL_DairyQuestUser" %A9 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
FormatStr "FLD_Step='%s',FLD_TQCASE=%s,FLD_Condition1='%s'" "NULL" %D1 %A2


Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_Condition1Amount=%s,FLD_Condition2='%s',FLD_Condition2Amount=%s" %D2 %A3 %D3


Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_Condition3='%s',FLD_Condition3Amount=%s,FLD_TQFame=%s" %A4 %D4 %D5


Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
FormatStr "FLD_TQNPC='%s',FLD_TQPosition='%s'" %A5 %A6


Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 %A8
goto @Ready_QuestDairyToday



;;;;;QT_readybook

[@Ready_QuestDairyToday]
#IF
!StartDailyQuest
Check [209] 1
Check [409] 0
#ACT
FormatStr "FLD_USERNAME='%s'" %USERNAME
Mov A8 %A9
ReadValueSql "TBL_DairyQuestUser" %A8 "FLD_QuestIdx,FLD_TQNPC,FLD_TQPosition" [@Ready_QuestDairyToday_Set]
#SAY
Ժ\\

[@Ready_QuestDairyToday_Set()]
#ACT
mov D1 %ARG(1)
mov A1 %ARG(2)
mov A2 %ARG(3)
goto @Ready_QuestDairyToday_Content

[@Ready_QuestDairyToday_Content]
#SAY
Ľ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}\\
<쿴/@DailyMissonView>\\
< /@exit>


;;;;;QT_readybook

[@SHNPCSetDairyQuest]
#IF
Check [209] 1
Check [409] 0
#ACT
FormatStr "FLD_USERNAME='%s'" %USERNAME
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_Status,FLD_TQNPC" [@SHNPCSetDairyQuest_Set]
#SAY
Ժ \\
#ELSESAY
<%UESERNAME>ûʲô˵ġ \\
< /@exit>

[@SHNPCSetDairyQuest_Set()]
#ACT
mov D0 %ARG(1)
mov A0 %ARG(2)
Mov A1 %ARG(3)

#IF
!StartDailyQuest
Equal A0 "Ready"
#ACT
goto @SHNPCSetDairyQuest_Ready
break

#IF
!StartDailyQuest
Equal A0 "Act"
#ACT
goto @SHNPCSetDairyQuest_Act
break

#IF
#SAY
ûʲôͷ \\
< /@exit>

[@SHNPCSetDairyQuest_Ready]
#ACT
goto @NPCSet_QuestDairyToday

[@NPCSet_QuestDairyToday]
{
#IF
!StartDailyQuest
Check [209] 1
Check [409] 0
#ACT
FormatStr "FLD_USERNAME='%s'" %USERNAME
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_TQCASE" [@NPCSet_QuestDairyToday_Next]
#SAY
Ժ\\

[@NPCSet_QuestDairyToday_Next()]
#ACT
mov D0 %ARG(1)	;;FLD_QuestIdx
mov D1 %ARG(2)	;;FLD_TQCASE
FormatStr "FLD_TQIDX=%s" %D0
ReadStringSql "TBL_DairyQuestSet" %A9 "FLD_TQNPCContent1" [@NPCSet_QuestDairyToday_Next1]

[@NPCSet_QuestDairyToday_Next1]
#ACT
mov A0 %ARG(1)	;;FLD_TQNPCContent1-Npc˵Ļ

#IF
Equal D1 10
#ACT
close
Set [210] 0
Set [409] 1
goto @NPCACT_QuestDairyToday_Result
break

#IF
#SAY
<$OUTPUT(A0)> \
</@NPCSet_QuestDairyToday_Next3> \
<ܾ/@exit>

[@NPCSet_QuestDairyToday_Next3]
#IF
Equal D1 0
#ACT
close
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step=''"
goto @ConfirmTodayQuest
break

#IF
Equal D1 1
#ACT
close
Set [210] 1
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress',FLD_STEP1='',FLD_STEP2='',FLD_STEP3=''"
goto @ConfirmTodayQuest
break

#IF
Equal D1 2
#ACT
close
Set [210] 1
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"
goto @ConfirmTodayQuest
break

#IF
Equal D1 3
#ACT
close
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step=''"
goto @ConfirmTodayQuest
break

#IF
Equal D1 4
#ACT
close
FormatStr "FLD_USERNAME='%s'" %USERNAME
ReadValueSQL "TBL_DairyQuestUser" %A9 "FLD_Condition2,FLD_Condition2Amount" @NPCSet_QuestDairyToday_Next3_Case4or7
break

#IF
Equal D1 7
#ACT
close
FormatStr "FLD_USERNAME='%s'" %USERNAME
ReadValueSQL "TBL_DairyQuestUser" %A9 "FLD_Condition2,FLD_Condition2Amount" @NPCSet_QuestDairyToday_Next3_Case4or7
break

#IF
Equal D1 9
#ACT
close
Set [210] 1
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress',FLD_STEP1='',FLD_STEP2='',FLD_STEP3=''"
goto @ConfirmTodayQuest
break

#IF
#ACT
close
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"
goto @ConfirmTodayQuest
break

[@NPCSet_QuestDairyToday_Next3_Case4or7()]
#ACT
Mov A0 %ARG(1)
Mov D0 %ARG(2)
Give %A0 %D0
FormatStr "FLD_USERNAME='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"
goto @ConfirmTodayQuest
break


[@ConfirmTodayQuest]
#SAY
Ժ\\
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_Status" [@PRECall_SetDairyQuest_Check]

[@PRECall_SetDairyQuest_Check()]
#IF
#ACT
mov D8 %ARG(1)
mov A0 %ARG(2)

#IF
ELARGE D8 136
ESMALL D8 200 
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='End'"
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 266
ESMALL D8 300 
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='End'"
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 600
ESMALL D8 699
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='End'"
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
ELARGE D8 703
ESMALL D8 899 
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='End'"
break
#SAY
û¿ˣ\\
<ر/@exit>

#IF
EQUAL D8 400
or EQUAL D8 500
or LARGE D8 900
#ACT
FormatStr "FLD_UserName='%s'" %USERNAME
UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='End'"
break
#SAY
û¿ˣ\\
<ر/@exit>



#IF
Equal A0 "Ready"
#ACT
goto @Ready_QuestDairyToday
break

#IF
Equal A0 "Act"
#ACT
goto @Call_SetTodayQuest_ACT
break

#IF
Equal A0 "End"

#SAY
ûˡ\\
< /@exit>
#ACT
break

[@Call_SetTodayQuest_ACT]
#ACT
goto @Act_QuestDairyToday


[@Ready_QuestDairyToday]
#IF
!StartDailyQuest
Check [209] 1
Check [409] 0
#ACT
FormatStr "FLD_USERNAME='%s'" %USERNAME
Mov A8 %A9
ReadValueSql "TBL_DairyQuestUser" %A8 "FLD_QuestIdx,FLD_TQNPC,FLD_TQPosition" [@Ready_QuestDairyToday_Set]
#SAY
Ժ\\

[@Ready_QuestDairyToday_Set()]
#ACT
mov D1 %ARG(1)
mov A1 %ARG(2)
mov A2 %ARG(3)
goto @Ready_QuestDairyToday_Content

[@Ready_QuestDairyToday_Content]
#SAY
Ľ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}\\
<쿴/@DailyMissonView>\\
< /@exit>



[@DailyMissonView]
#ACT
goto @SHNPCSetDairyQuest


[@Act_QuestDairyToday]
#IF
!StartDailyQuest
Check [209] 1
Check [409] 0
#ACT
FormatStr "FLD_USERNAME='%s'" %USERNAME
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_TQCASE,FLD_TQFame,FLD_TQNPC,FLD_TQPosition" [@ACT_QuestDairyToday_Set]
#SAY
Ժ\\

[@ACT_QuestDairyToday_Set()]
#ACT
mov D0 %ARG(1)	;;FLD_QuestIdx
Mov D2 %ARG(2)	;;FLD_TQCASE
mov D1 %ARG(3)	;;FLD_TQFame
mov A0 %ARG(4)	;;FLD_TQNPC
mov A1 %ARG(5)	;;FLD_TQPosition
FormatStr "FLD_TQIdx='%s'" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQREword1,FLD_TQREword1Amount,FLD_TQREword2,FLD_TQREword2Amount,FLD_TQREword3,FLD_TQREword3Amount" [@ACT_QuestDairyToday_Set2]


[@ACT_QuestDairyToday_Set2()]
#IF
#ACT
mov 1 %ARG(1)
mov D9 %ARG(2)
mov 2 %ARG(3)
mov D8 %ARG(4)
mov 3 %ARG(5)
mov D7 %ARG(6)
goto @ACT_QuestDairyToday_Set3
break



[@ACT_QuestDairyToday_Set3]

#IF
Equal D2 0
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition1Amount,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3,FLD_TQCondition3Amount" [@ACT_QuestDairyToday_Set3_Case0]
break

#IF
Equal D2 1
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition2,FLD_TQCondition3,FLD_TQMap" [@ACT_QuestDairyToday_Set3_Case1]
break

#IF
Equal D2 2
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3,FLD_TQCondition3Amount,FLD_TQMap" [@ACT_QuestDairyToday_Set3_Case2]
break

#IF
Equal D2 3
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition1Amount,FLD_TQCondition2,FLD_TQCondition2Amount" [@ACT_QuestDairyToday_Set3_Case3]
break

#IF
Equal D2 4
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition2,FLD_TQCondition2Amount" [@ACT_QuestDairyToday_Set3_Case4]
break

#IF
Equal D2 5
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition2,FLD_TQCondition2Amount" [@ACT_QuestDairyToday_Set3_Case5]
break

#IF
Equal D2 6
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1" [@ACT_QuestDairyToday_Set3_Case6]
break

#IF
Equal D2 7
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQCondition1,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3,FLD_TQCondition3Amount" [@ACT_QuestDairyToday_Set3_Case7]
break

#IF
Equal D2 8
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQMap" [@ACT_QuestDairyToday_Set3_Case8]
break

#IF
Equal D2 9
#ACT
FormatStr "FLD_TQIDX=%s" %D0
ReadValueSql "TBL_DairyQuestSet" %A9 "FLD_TQMap" [@ACT_QuestDairyToday_Set3_Case9]
break

[@ACT_QuestDairyToday_Set3_Case0()]
#IF
#ACT
mov A8 %A0
mov A2 %ARG(1)	;;FLD_TQCondition1
mov D3 %ARG(2)	;;FLD_TQCondition1Amount
mov A3 %ARG(3)	;;FLD_TQCondition2
mov D4 %ARG(4)	;;FLD_TQCondition2Amount
mov A4 %ARG(5)	;;FLD_TQCondition3
mov D5 %ARG(6)	;;FLD_TQCondition3Amount

#IF
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ѰҲȥ{FCOLOR/10}<$OUTPUT(A2)> <$OUTPUT(D3)>{FCOLOR/12} \

#IF
!Equal A3 ""
#SAY
2ѰҲȥ{FCOLOR/10}<$OUTPUT(A3)> <$OUTPUT(D4)>{FCOLOR/12} \

#IF
!Equal A4 ""
#SAY
3ѰҲȥ{FCOLOR/10}<$OUTPUT(A4)> <$OUTPUT(D5)>{FCOLOR/12} \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\
ܵĽ(Լѡ)(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case1()]
#ACT
mov A8 %A0
mov A2 %ARG(1)	;;FLD_TQCondition1
mov A3 %ARG(2)	;;FLD_TQCondition2
mov A4 %ARG(3)	;;FLD_TQCondition3
mov A5 %ARG(4)	;;FLD_TQMap

#IF
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1{FCOLOR/10}<$OUTPUT(A5)>{FCOLOR/12}ܹ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \

#IF
!Equal A3 ""
#SAY
2{FCOLOR/10}<$OUTPUT(A5)>{FCOLOR/12}ܹ{FCOLOR/10}<$OUTPUT(A3)>{FCOLOR/12} \

#IF
!Equal A4 ""
#SAY
3{FCOLOR/10}<$OUTPUT(A5)>{FCOLOR/12}ܹ{FCOLOR/10}<$OUTPUT(A4)>{FCOLOR/12} \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case2()]
#IF
#ACT
mov A8 %A0
mov A2 %ARG(1)	;;FLD_TQCondition1
mov A3 %ARG(2)	;;FLD_TQCondition2
mov D3 %ARG(3)	;;FLD_TQCondition2Amount
mov A4 %ARG(4)	;;FLD_TQCondition3
mov D4 %ARG(5)	;;FLD_TQCondition3Amount
mov A5 %ARG(6)	;;FLD_TQMap

#IF
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1 {FCOLOR/10}<$OUTPUT(A5)>{FCOLOR/12}ܹ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \
2 ѰҲȥ{FCOLOR/10}<$OUTPUT(A3)> <$OUTPUT(D3)>{FCOLOR/12} \

#IF
!Equal A4 ""
#SAY
3ѰҲȥ{FCOLOR/10}<$OUTPUT(A4)> <$OUTPUT(D4)>{FCOLOR/12} \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case3()]
#ACT
mov A8 %A0
mov A2 %ARG(1)	;;FLD_TQCondition1
mov D3 %ARG(2)	;;FLD_TQCondition1Amount
mov A3 %ARG(3)	;;FLD_TQCondition2
mov D4 %ARG(4)	;;FLD_TQCondition2Amount

#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ѰҲȥ{FCOLOR/10}<$OUTPUT(D3)><$OUTPUT(A3)><$OUTPUT(D4)>ϵ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}\


#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>



[@ACT_QuestDairyToday_Set3_Case4()]
#ACT
mov A8 %A0
mov A2 %ARG(1)	;;FLD_TQCondition1
mov A3 %ARG(2)	;;FLD_TQCondition2
mov D3 %ARG(3)	;;FLD_TQCondition2Amount

#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ҵ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \
2{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}ȥ{FCOLOR/10}<$OUTPUT(A3)><$OUTPUT(D3)>{FCOLOR/12} \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case5()]
#ACT
mov A8 %A0
mov A2 %ARG(1)
mov A3 %ARG(2)
mov D3 %ARG(3)
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ҵ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \
2{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A3)> <$OUTPUT(D3)>{FCOLOR/12} \
#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>




[@ACT_QuestDairyToday_Set3_Case6()]
#ACT
mov A8 %A0
mov A2 %ARG(1)
#SAY
ίˣ {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1 {FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}ȥ \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case7()]
#ACT
mov A8 %A0
mov A2 %ARG(1)
Mov A3 %ARG(2)
Mov D3 %ARG(3)
Mov A4 %ARG(4)
Mov D4 %ARG(5)
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ҵ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \
2{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}ȥ<$OUTPUT(A3)> <$OUTPUT(D3)> \
3ȥ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} <$OUTPUT(A4)> <$OUTPUT(D4)>Ȼ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}ȥ \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case8()]
#ACT
mov A8 %A0
mov A2 %ARG(1)
#SAY
ίˣ {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1ѯ{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12} \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ֲ쿴һ/@rechoosedaily> \
<ر/@exit>

[@ACT_QuestDairyToday_Set3_Case9()]
#ACT
mov A2 %ARG(1) ;;
mov A8 %A0
#SAY
ίˣ{FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12}{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\\
1{FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}  \

#IF
EQUAL 1 "EXP"
#ACT
mov 1 ""

#IF
EQUAL 1 "money"
#ACT
mov 1 ""

#IF
EQUAL 2 "EXP"
#ACT
mov 2 ""

#IF
EQUAL 2 "money"
#ACT
mov 2 ""

#IF
EQUAL 3 "EXP"
#ACT
mov 3 ""

#IF
EQUAL 3 "money"
#ACT
mov 3 ""

#IF
#SAY
\
󣬽õ{FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\ 
ܵĽ(Լѡ)\
___1.[<$OUTPUT(1)><$OUTPUT(D9)>] \
___2.[<$OUTPUT(2)><$OUTPUT(D8)>] \
___3.[<$OUTPUT(3)><$OUTPUT(D7)>] \
<ʹ1ƶ/@MOVETONPC>{FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}\
<Ը⣬10ָһ/@rechoosedaily> \
< /@exit>
;;==============================================================================================ѡÿ====================
[@MOVETONPC]
#if
checkcmd FINDNPC %A0
checkcmd CHECKUSERJF 1
!checkcmd checkmapflag ksnomove
!checkcmd checkmapflag KSNOMOVEEX
!checkcmd checkmapflag ksnomove %A0 1
!checkcmd checkmapflag KSNOMOVEEX %A0 1
#act
actcmd SETUSERJF - 1 NPC
actcmd MOVETONPC %A0
sysmsg "һִ͵NPCԱ,㻹ʣ <$USERJF> ֣"
#elsesay
ڵĵͼ޷ʹøù.\
{FCOLOR/10} <$OUTPUT(A0)> {FCOLOR/12}޷.\
û1.\



[@rechoosedaily]
#IF
checkcmd CHECKUSERJF 10
#ELSEACT
break
#ELSESAY
Բ𣬻ֲ㣬Ҫ10ֲѡ\\
<ر/@exit>


#IF
check [060] 0
check [061] 0
#ACT
set [060] 1
set [061] 0
actcmd setuserjf - 10 ѡ
;;sysmsg "һѡ"
goto @rechoosedaily1
break

#IF
check [060] 1
check [061] 0
#ACT
set [060] 0
set [061] 1
;;sysmsg "ڶѡ"
actcmd setuserjf - 10 ѡ
goto @rechoosedaily1
break

#IF
check [060] 0
check [061] 1
#ACT
set [060] 1
set [061] 1
;;sysmsg "ѡ"
actcmd setuserjf - 10 ѡ
goto @rechoosedaily1
break

#ELSEACT
actcmd setuserjf - 10 ѡ
goto @rechoosedaily1

;#IF
;check [060] 1
;check [061] 1
;#ACT
;#SAY
;ԲλѾֻ꣬ǰˡ\\
;<ر/@exit>

[@rechoosedaily1]
#IF
Checklevel 71
#ACT
mov D1 10
mov D2 25
mov D3 50
mov D4 90
goto @SetDairyQuest_Setting1
break

#IF
Checklevel 61
#ACT
mov D1 8
mov D2 20
mov D3 40
mov D4 72
goto @SetDairyQuest_Setting1
break

#IF
Checklevel 41
#ACT
mov D1 6
mov D2 15
mov D3 30
mov D4 54
goto @SetDairyQuest_Setting1
break

#IF
Checklevel 31
#ACT
mov D1 4
mov D2 10
mov D3 20
mov D4 36
goto @SetDairyQuest_Setting1
break

#IF
Checklevel 11
#ACT
mov D1 2
mov D2 5
mov D3 10
mov D4 18
goto @SetDairyQuest_Setting1
break

[@SetDairyQuest_Setting1]
#IF
#ACT
movr P0 100

#IF
Large D4 100
#SAY
û¿ˣ\\
<ر/@exit>
#ACT
break

#IF
Small P0 %D1
#ACT
goto @SetDairyQuest_Setting_Grade10
break

#IF
Small P0 %D2
#ACT
goto @SetDairyQuest_Setting_Grade20
break

#IF
Small P0 %D3
#ACT
goto @SetDairyQuest_Setting_Grade30
break

#IF
Small P0 %D4
#ACT
goto @SetDairyQuest_Setting_Grade40
break

#IF
#ACT
goto @SetDairyQuest_Setting_Grade50
break

[@SetDairyQuest_Setting_Grade10]
begin
#IF
#ACT
movr P0 20

#IF
small P0 100
#ACT
inc P0 101
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break
end

[@SetDairyQuest_Setting_Grade20]
begin
#IF
#ACT
movr P0 40

#IF
small P0 100
#ACT
inc P0 201
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break
end

[@SetDairyQuest_Setting_Grade30]
begin
#IF
#ACT
movr P0 40

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break
end

[@SetDairyQuest_Setting_Grade40]
begin
#IF
#ACT
movr P0 99

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break
end

[@SetDairyQuest_Setting_Grade50]
begin
#IF
#ACT
movr P0 100

#IF
small P0 100
#ACT
inc P0 301
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break

#IF
small P0 200
#ACT
inc P0 900
RandSetDailyQuest %P0 %P0
mov D8 %P0
goto @SetDairyQuest_Setting_PreSet1
break
end

[@SetDairyQuest_Setting_PreSet1]
#IF
#ACT
Set [209] 1
Set [210] 0
Set [409] 0
Formatstr "FLD_TQIDX=%s" %D8
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCASE,FLD_TQCondition1,FLD_TQCondition1Amount,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3" [@SearchingUser_TodayQuest1]
#SAY
Եȡ\\

[@SearchingUser_TodayQuest1()]
#ACT
Mov D1 %ARG(1)
Mov A2 %ARG(2)
Mov D2 %ARG(3)
Mov A3 %ARG(4)
Mov D3 %ARG(5)
Mov A4 %ARG(6)
Formatstr "FLD_TQIDX=%s" %D8
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCondition3Amount,FLD_TQFame,FLD_TQNPC,FLD_TQPosition" [@SearchingUser_User_TodayQuest1]

[@SearchingUser_User_TodayQuest1()]
#ACT
Mov D4 %ARG(1)
Mov D5 %ARG(2)
Mov A5 %ARG(3)
Mov A6 %ARG(4)
Set [409] 0

#IF
EQUAL D1 1
or EQUAL D1 2
or EQUAL D1 9  
#ACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "Ready"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
WriteValueSql "TBL_DairyQuestUser" %A7 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
FormatStr "FLD_Step='%s',FLD_TQCASE=%s,FLD_Condition1='%s'" "NULL" %D1 %A2
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_Condition1Amount=%s,FLD_Condition2='%s',FLD_Condition2Amount=%s" 0 %A3 0
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_Condition3='%s',FLD_Condition3Amount=%s,FLD_TQFame=%s" %A4 0 %D5
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_TQNPC='%s',FLD_TQPosition='%s'" %A5 %A6
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
goto @Ready_QuestDairyToday



#ELSEACT
FormatStr "'%s',%s,'%s'" %USERNAME %D8 "Ready"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
WriteValueSql "TBL_DairyQuestUser" %A7 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8
FormatStr "FLD_Step='%s',FLD_TQCASE=%s,FLD_Condition1='%s'" "NULL" %D1 %A2
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_Condition1Amount=%s,FLD_Condition2='%s',FLD_Condition2Amount=%s" %D2 %A3 %D3
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_Condition3='%s',FLD_Condition3Amount=%s,FLD_TQFame=%s" %A4 %D4 %D5
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
FormatStr "FLD_TQNPC='%s',FLD_TQPosition='%s'" %A5 %A6
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8
goto @Ready_QuestDairyToday
}
;;;QQ:67762207